# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-catalogue
_pkgname=catalogue
pkgver=2.1.0
pkgrel=7
pkgdesc='Library that makes it easy to add function (or object) registries to your code.'
arch=('any')
url='https://pypi.org/project/catalogue/'
license=('MIT')
depends=('python' 'python-pytest' 'python-zipp' 'python-typing_extensions'
         'mypy')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('d12b02d626d04c4be771b9160555506096e8101d0903f40b9ae363726ad699f2700225a8dc9ab58f955e14d322ba91af6a83e71f6d23ebd5a314db262d2d8c46')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

